package io;

import java.io.*;

/**
 * @description: 字符复制文件
 * @author apple
 * @date 2021/9/12 12:34 上午
 * @version 1.0
 */
public class CharacterCopyDemo {

    public static void main(String[] args) throws IOException {

        Reader in = new FileReader("/Users/apple/tx.txt");
        Writer out = new FileWriter("tx3.txt");
        char[] buffs = new char[1024];
        int length = 0;
        while ((length = in.read(buffs)) != -1) {
            out.write(buffs);
        }
        out.close();
        in.close();
    }
}
